<template>
	<div id="">
		<van-row>
			<van-col span="24">
				<van-col span="2" offset="1">
					<van-icon name="arrow-left" size="30" @click="icon" class="icon" />
				</van-col>
				<van-col span="21">
					<p class="texts">{{name}}</p>
				</van-col>
			</van-col>
		</van-row>
		<van-row style="margin-left: 6px;display: flex;flex-wrap: wrap;">
			<van-col span="10" style="height: 18.75rem;margin-left: 1.25rem;margin-top: 1.25rem;"
				v-for="(item,index) in listParticulars">
				<van-image width="100%" height="65%" :radius="5" :lazy-load="true" :src="http+item.original_img" />
				<van-row>
					<van-col span="24">
						<h3
							style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 6vh;text-align: center;">
							{{item.goods_name}}
						</h3>
					</van-col>
					<van-col span="24">
						<h2 style="color: #FF0000;">￥{{item.shop_price}}</h2>
					</van-col>
					<van-col span="24" style="font-size: 16px;color: #656;">
						{{item.click_count}}万人  {{item.collect_sum}}收藏
					</van-col>
				</van-row>
			</van-col>
		</van-row>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				name: '',
				listParticulars: [],
				http: 'https://img.9lele.com',
			}
		},
		created() {
			this.name = this.$route.query.name
			let id = this.$route.query.index * 1
			console.log(this.$route.query)
			this.$nextTick(function() {
				this.$store.dispatch("user/vuexlistParticulars", id)
					.then(e => {
						console.log(e, 33333)
						this.listParticulars = e.data.data
					})
			})
		},
		methods: {
			icon() {
				this.$router.push('/')
			}
		}
	}
</script>

<style>
	.texts {
		height: 2.8125rem;
		margin-left: 35%;
		font-size: 25px;
		line-height: 65px;
	}
</style>
